home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
ftp.cs.arizona.edu
/
ftp.cs.arizona.edu.tar
/
ftp.cs.arizona.edu
/
icon
/
newsgrp
/
group01a.txt
/
000049_icon-group-sender _Thu Jun 1 16:56:55 2000.msg
< prev
next >
Wrap
Internet Message Format
|
2002-01-03
|
3KB
Return-Path: <icon-group-sender>
Received: (from root@localhost)
by baskerville.CS.Arizona.EDU (8.9.1a/8.9.1) id QAA15837
for icon-group-addresses; Thu, 1 Jun 2000 16:56:35 -0700 (MST)
Message-Id: <200006012356.QAA15837@baskerville.CS.Arizona.EDU>
Date: Thu, 01 Jun 2000 14:10:08 -0700
From: Steve Wampler <swampler@noao.edu>
X-Accept-Language: en
To: icon-group <icon-group@optima.CS.Arizona.EDU>
Subject: Re: CODE() and @/2
Errors-To: icon-group-errors@optima.CS.Arizona.EDU
Status: RO
Content-Length: 2115
"F.G. van DORP" wrote:
>
> On 30 May 2000 20:09:35 -0400, Steve Wampler <swampler@noao.edu> wrote:
>
> >"F.G. van DORP" wrote:
> >
> >> I tried
> >>
> >> nextLabel := create "L" || (1 to 10) || ("foo" @ &source)
> >
> >What did you intend the above to do?
> ....to find out if binary @ behaves like a regular RETURN
Ah, it "sortof" does, but when you reactivate the co-expression, you're
going to resume execution as if you've returned from "foo" @ &source
(with the &null value since the activation "@nextLabel" is unary.)
This &null value can't be concatentated to the string you're
building.
>
> >
> > nextLabel := create "L" || (1 to 10) || "foo"
> >
...
>
> Under my ICON (Windows Icon v.9.3.1, Wi v.1.01) above example
> prints "L1foo" immediately followed by an illegal op. error.
Hmmm, can you email me the full program where this is happening?
I'd like to take a closer look...
> I f you change it to, let's say
> procedure main
> nextLabel := create (("L" || (1 to 10) || "foo") @ &source)
> write("1 ",@nextLabel)
> write("2 ",@nextLabel)
> write("3 ",@nextLabel)
> write("4 ",@nextLabel)
> write("5 ",@nextLabel)
> end
> it prints
>
> "1 L1foo"
> "2"
> "3 L2foo"
> "4"
> illegal op error
>
> This behavior doesn't change if you replace ("L" || (1 to 10) || "foo")
> with any other generator, nor &source with &main in this particular example.
Well, that's nearly correct (except for the illegal op error at the end...):
I get:
1 L1foo
2
3 L2foo
4
5 L3foo
You shouldn't have the @source there, it's not doing what you want, because
you're "returning" into the co-expression...
However, it does look like there is a bug in 9.3.1 for Windows. Please
email me the exact program (I can tell you had to type the above one
in by hand...)!
I don't see this problem under either 9.3 or 9.3.2 with either Linux
or Solaris.
--
Steve Wampler- SOLIS Project, National Solar Observatory
swampler@noao.edu